package com.itany.book.service.impl;

import com.itany.mapper.SupplierMapper;
import com.itany.pojo.Supplier;
import com.itany.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2019-09-20 下午2:22
 * Description：<描述>
 */

@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Throwable.class)
public class SupplierServiceImpl implements SupplierService {


    @Autowired
    private SupplierMapper supplierMapper;


    @Transactional(readOnly = true)
    public List<Supplier> findAllSupplier() {

        List<Supplier> suppliers=supplierMapper.selectAllSupplier();
        return suppliers;
    }
}